<template>
	<Container>
		<view class="header">
			<view class="article" v-for="(item, index) in assignment.optionArticles" :key="index">
				<image :style="{ filter: colors[item.colorText] }" :src="'https://hz-huibenxia.oss-cn-shenzhen.aliyuncs.com/question/shape/' + encodeURI(item.shapeText) + '.png'"  mode="aspectFit"></image>
			</view>
			<AudioIcon @iconTap="iconTap" :questionPress="questionPress" />
		</view>
		<Question :question="assignment.questionName" />
		<Record  ref="audio" @recordFinish="recordFinish" :isStart="questionPress" :answerLimitMs="assignment.answerLimitMs" :answerText="assignment.answerTexts" :typeCode="assignment.typeCode" />
	</Container>
</template>

<script>
import { mixins } from '../../../common/mixins/assignmentDefault.js'
import AudioIcon from '../audioIcon.vue'
import Question from '../questionName.vue'
import Container from '../container.vue'
import Record from '../record.vue'
export default {
	mixins: [mixins],
	components: { AudioIcon, Question, Container, Record },
	data() {
		return {
			colors: this.config.shapeColor
		}
	}
}
</script>

<style scoped lang="stylus">
.header
	height 50vh
	width 720rpx
	border-radius 70rpx
	background white
	border 12rpx solid #FCC77D
	box-sizing border-box
	margin 1.5vh 0 5vh 0
	display flex
	justify-content center
	flex-wrap wrap
	align-items center
	position relative
	.article
		width 33.3%
		height 45%
		display flex
		justify-content center
		align-items center
		image
			width 80%
			height 80%
</style>
